package com.yaodian100.ec.product.service;

import java.util.List;
import java.util.Map;

import com.yaodian100.core.common.service.DomainService;
import com.yaodian100.ec.product.entity.OrderComment;
import com.yaodian100.ec.product.entity.OrderCommentLog;
import com.yaodian100.ec.product.entity.ProductComment;

public interface OrderCommentService extends DomainService<OrderComment> {

	public OrderComment saveOrderComment(OrderComment oc);

	public boolean commentToWorkorder(int size);

	public OrderComment rePostOrderComment(OrderComment oc);

	public OrderComment approveOrderCommentByWorkorder(String cmid, String commentStatus, String failReason)
			throws NumberFormatException, Exception;

	public OrderComment approveOrderComment(String cmid, String commentStatus, String failReason, String from)
			throws NumberFormatException, Exception;

	public boolean hideOrderComment(String cmid, String hide);

	public boolean calcProductComment(String productId);

	public boolean addCommentLog(String cmid, String type, String failReason);

	public List<OrderComment> getLast3CommentByProductId(String productId);

	public List<OrderCommentLog> getOrderCommnetLogByCmid(String cmid);

	public ProductComment getProductCommentByProductId(String productId);

	// 可评价的商品
	public List<Object> getOrderCommentListByMemberId(String memberId, String orderId, String productId, int firstResult,
			int maxResult);

	public Map<String, Object> getOrderComments(String memberId, String orderId, String productId, int page);

	public Map<String, Object> getOrderCommentHistory(String memberId, int page, String commentStParam);

	/**
	 * 是否可評價該商品(檢查狀態)
	 * 
	 * @param detailProdId
	 * @return
	 */
	public boolean canComment(String memberId, String detailProdId, String func);

	public Map<String, String> getProductInfo(String detailProdId);

	// 可评价的商品數
	public Number getOrderCommentListByMemberId(String memberId, String orderId, String detailProdId);

	// 可评价的商品數
	public Number getOrderCommentListByMemberId(String memberId, String productId);
}
